﻿<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8">	
</head>
<body>
	<?php print_r($currentTruong); ?>
	
	<h1>Sửa thông tin học sinh</h1>
	
	<?php
	$lophoc = array();
	foreach($lops as $lop){
		$lophoc[$lop['Lop']['MaLop']] = $lop['Lop']['TenLop'];
	}
	$khoihoc = array();
	foreach($khois as $khoi){
		$khoihoc[$khoi['Khoi']['MaKhoi']] = $khoi['Khoi']['TenKhoi'];
	}
	$truonghoc = array();
	foreach($truongs as $truong){
		$truonghoc[$truong['Truong']['MaTruong']] = $truong['Truong']['TenTruong'];
	}
	echo $this->Form->input('MaTruong', array('type' => 'select', 'label'=>'Mã Trường', 'options' => $truonghoc, 'selected' => $currentTruong[0]['Truong']['MaTruong']));	
	echo $this->Form->input('MaKhoi', array('type' => 'select', 'options' => $khoihoc, 'selected' => $hocsinh[0]['Lop']['MaKhoi']));	
	echo $this->Form->input('MaLop', array('type' => 'select', 'options' => $lophoc, 'selected' => $hocsinh[0]['Hocsinh']['MaLop']));	
	echo $this->Form->create('Hocsinh', array('controller'=>'hocsinhs', 'action' => 'edit'));
	echo $this->Form->input('MaHS',array('readonly'=>'readonly','value'=>$hocsinh[0]['Hocsinh']['MaHS']));	
	echo $this->Form->input('HoHS',array('value'=>$hocsinh[0]['Hocsinh']['HoHS']));
	echo $this->Form->input('TenHS',array('value'=>$hocsinh[0]['Hocsinh']['TenHS']));
	echo $this->Form->input('NgaySinh',array('type'=>'date', 'dateFormat' => 'DMY', 'minYear'=>1990,'maxYear'=>2030, 'selected'=>$hocsinh[0]['Hocsinh']['NgaySinh']));
	echo $this->Form->input('NoiSinh',array('value'=>$hocsinh[0]['Hocsinh']['NoiSinh']));
	echo $this->Form->input('DiaChi',array('value'=>$hocsinh[0]['Hocsinh']['DiaChi']));
	echo $this->Form->input('HoTenCha',array('value'=>$hocsinh[0]['Hocsinh']['HoTenCha']));
	echo $this->Form->input('HoTenMe',array('value'=>$hocsinh[0]['Hocsinh']['HoTenMe']));	
	echo $this->Form->end('Đồng ý');
	?>
</body>
</html>